import { createRouter, createWebHistory } from 'vue-router'
import { errorRouter, staticRouter } from './module/basic'
import { setupClientDynamicRouter } from './module/dynamic'
import setupGuard from './guard'

const router = createRouter({
  history: createWebHistory(),
  routes: [...staticRouter, ...errorRouter],
})

setupClientDynamicRouter(router)

console.log('%c%s', 'font-size:2em;background: #DD5644;color: #FFF', '路由', router)

setupGuard(router)

export default router
